#pragma once
#include <string>
#if defined WIN32 || defined _WIN32 || defined __CYGWIN__
	#include <Windows.h>
	/// <summary>
	/// gstring is WCHAR string on Windows and char string on Linux.
	/// </summary>
	typedef std::wstring gstring;
	/// <summary>
	/// gchar is WCHAR on Windows.
	/// </summary>
	typedef WCHAR gchar;

	#define to_gstring to_wstring

	#define gtoi _wtoi
#else
	/// <summary>
	/// gstring is a char string on Linux and WCHAR string on Windows.
	/// </summary>
	typedef std::string gstring;
	/// <summary>
	/// gchar is char on Linux.
	/// </summary>
	typedef char gchar;

	#ifndef MAX_PATH
		#define MAX_PATH 256
	#endif

	#define to_gstring to_string

	#define gtoi atoi

	#ifndef TEXT
		#ifdef USE_WIDE_CHAR
			#define TEXT(x) L##x
		#else
			#define TEXT(x) x
		#endif
	#endif
#endif
